<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="javax.swing.JOptionPane"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Dang nhap</title>
<style>
		*{margin:0; padding:0;}
	
		body{
			background: #ddd;
			width:100%;
			height:100%;
		}
		
		
		#formLogin{
			position: relative;
			top:25%;
			left:25%;
			width:50%;
			height:200px;
			background: #0099ff;
			border-radius: 15px;
			border: solid 5px white;
		}
		#wrapForm{
			position: absolute;
			width:100%;
			top:25%;
			left:0;
		}
		
		#wrapForm label{
			width: 45%;
			display: block;
			float:left;
			text-align:right;
			margin-right:5px;

		}
		
		#wrapForm input{
			width:200px;
			
		}
		#wrapForm .button{
			width:70px;
			height:30px;
			background: #0077ff;
			border-radius:10px;
			box-shadow: 1px 1px 1px #ddd;
			font-weight:bold;
			-webkit-transition: all 200ms linear;
		}
		
		#wrapForm .button:hover{
			background: #252525;
			color:white;
		}
		#wrapForm div{
			margin: 5px 0px;
		}
		
		#showError{
			position: absolute;
			bottom: 0;
			left:25%;
			right:25%;
			width: 50%;
			margin-bottom: 10px;
			font-style: italic;
			font-weight:bold;
			color: red;
		}

	</style>
	</head>
	
	
	
	
	<body>
		<div id="formLogin">
			<form action="dangNhap" method="post">
				<div id="wrapForm">
					<h3 align="center" style="color:white;">Login Form</h3>
					<div>
						<label for="userName">User Name: </label> 
						<input type='text' name="username" id="username" />
						<div style="clear:both;"></div>
					</div>
					
					<div>
						<label for="password">Password: </label> 
						<input type="password" name="password" id="password" />
						<div style="clear:both;"></div>
					</div>
					
					<div align="center">
						<input type="submit" value="Login" class="button" />
					</div>
				</div>
			</form>
			
			<div id="showError" align="center">
				<%
					try{
						String loginFail = request.getAttribute("logFail").toString();
						out.print(loginFail);
					}catch(Exception e){
						e.printStackTrace();
					}
				%>
			</div>
			
				
		</div>
		
		
	<body>
</html>